import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.zm.demo.AppConfig;
import com.zm.demo.entry.Question;
import com.zm.demo.mapper.QuestionMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringRunner;

//@RunWith(SpringRunner.class)
//@ContextConfiguration(classes = AppConfig.class)
public class test {

//    @Autowired
//    QuestionMapper questionMapper;
//
//    @Test
//    public void test1(){
//        Question question = new Question();
//        question.setType("填空题");
//        LambdaQueryWrapper<Question> lqw = new LambdaQueryWrapper<>();
//        if(question.getType()!=null && question.getType().isBlank()==false){
//            lqw.eq(Question::getType, question.getType());
//        }
//        if(question.getCourse()!=null && question.getCourse().isBlank()==false){
//            lqw.eq(Question::getCourse, question.getCourse());
//        }
//        Page<Question> p = new PageDTO<>(1, 10);
//        p = questionMapper.selectPage(p, lqw);
//        System.out.println("p.getRecords() = " + p.getRecords());
//    }
}
